<%@page import="jpa.entities.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Winkelmand</title>
</head>
<body>
<h1>Winkelmand</h1>
	<a href="ArtikelenServlet">Bekijk Artikelen</a> |  
	<a href="WinkelmandServlet">Bekijk Winkelmandje</a> | 
	<a href="PersoonServlet">Bekijk Persoonlijke gegevens</a> | 
	<a href="OrderHistoryServlet">Bekijk Bestelgeschiedenis</a> |
<a href="LogoutServlet">Uitloggen</a> 
	
	

	<table border="3">
		<b><tr>
				<td>Soort:</td>
				<td>Naam:</td>
				<td>Omschrijving</td>
				<td>Prijs:</td>
			</tr></b>
		<%
		HashMap<Product,Integer> theArray = new HashMap<Product,Integer>();
			Object result = request.getAttribute("winkelwagenProds");
			theArray = (HashMap<Product,Integer>) result;

			for (Product b : theArray.keySet()) {
				out.println("<tr><td>" + b.getProductSoort() + "</td><td>"
						+ b.getProductNaam() + "</td><td>"
						+ b.getProductOmschrijving() + "</td><td>"
						+ b.getProductPrijs() + "</td></tr>");
			}
			
			
				
		%>


		<%
			String s = (String)request.getAttribute("bestellMessage");
			out.println(s);
		%>
		<form action="WinkelmandServlet" method="post">
			<input type="submit" name="Operation" value="leeg"> 
			<input type="submit" name="Operation" value="doorvoeren">
		</form>
	</table>
</body>
</html>